package com.bluezone.dec.uac;

import sc.c503.authclient.service.impl.ApiLoginService;
import sc.c503.authclient.service.splitImpl.ApiDynamicLoginService;
import sc.c503.authclient.service.splitImpl.ApiRelationService;
import sc.c503.authclient.service.splitImpl.ApiUserService;

/**
 * Class title: UAC Service 构建工厂 <br/>
 * Describe:
 * <pre>
 * 该工厂使用静态工厂方法,同时全局hold住UAC超级实例,也就是实例方法与静态方法共存
 * 静态方法作为普通场景使用,通过god实例运行的就是上帝;
 * 主要服务场景:
 *     1.手机+验证码登录
 *     2.人脸识别登录
 * </pre>
 * Date : 2018/6/14 14:53 <br/>
 * Project : bluezone-zhyy-nav <br/>
 *
 * @author konbluesky <br/>
 */
public class UACServiceFactory {

    private String token;

    public UACServiceFactory(String token) {
        this.token = token;
    }


    public static ApiLoginService apiLoginService() {
        return new ApiLoginService();
    }


    public static ApiUserService apiUserService(String token) {
        return new UACServiceFactory(token).GapiUserService();
    }

    public static ApiRelationService apiRelationService(String token) {
        return new UACServiceFactory(token).GapiRelationService();
    }

    /**
     * 实例方法
     *
     * @return
     */
    public ApiUserService GapiUserService() {
        return new ApiUserService(token);
    }

    public ApiRelationService GapiRelationService() {
        return new ApiRelationService(token);
    }

}
